Static member variables must be given an explicit definition in exactly one module. Ex:
class X {
//...
static int i; //*declare* static member X::i
//...
};
The linker will holler at you ('X::i is not defined') unless (exactly) one of your source files has something like the following:
int X::i = some_expression_evaluating_to_an_int; //*define* X::i
or:
int X::i; //define --but don't initialize-- X::i
The usual place to define static member variables of class 'X' is file 'X.C' (or X.cpp, X.cc, X.c++, X.c or X.cxx; see question on file naming conventions).